<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:a="https://github.com/pylonide/pylon" xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <script src="../ppc.js"></script>
    </head>
    <body>
        <a:skin src="../skins.xml" media-path="../images/" icon-path="../icons/" />
        
        <a:appsettings debug="0" />
        
        <a:model id="mdlTest">
            <data>
                <item>test</item>
            </data>
        </a:model>
        <a:model id="mdlTest2">
            <item>test</item>
        </a:model>
        <a:model id="mdlTest3">
            <data>
                <item>test</item>
                <item>test</item>
                <item>test</item>
            </data>
        </a:model>
        
        <div model="mdlTest" id="blah">
            <a:text id="txt" value="[mdlTest::item/text()]" />
            <hr />
            <a:text id="test" scrolldown="true" each="[item]" caching="false" width="200" height="100" style="border:1px solid red"><?lm
                <div>{
                    [text()] + <br />
                }</div>
            ?></a:text>
        </div>
        
        <a:button onclick="mdlTest.appendXml(mdlTest2.data.cloneNode(true));">test</a:button>
        <a:button onclick="blah.setAttribute('model', test.$model == mdlTest ? mdlTest3 : mdlTest)">switch</a:button>
    </body>
</html>